package com.grt192.demos;

import com.grt192.core.GRTObject;
import com.grt192.spot.mechanism.WallHugger.PinPulser;
import com.grt192.spot.sensor.GRTDemoSwitch;
import com.sun.spot.sensorboard.EDemoBoard;

/**
 * 300usec pulse on demo switch event
 * @author gerberduffy
 */
public class PulseOnDemoSwitchDemo extends GRTObject {

    public PulseOnDemoSwitchDemo() {
        EDemoBoard.getInstance().getIOPins()[0].setLow();
        EDemoBoard.getInstance().getIOPins()[1].setLow();
        EDemoBoard.getInstance().getIOPins()[2].setLow();
        EDemoBoard.getInstance().getIOPins()[3].setLow();
        EDemoBoard.getInstance().getIOPins()[4].setLow();
        
        GRTDemoSwitch s1 = new GRTDemoSwitch(0, 50, "switch");
        s1.start();


        log("starting pulsepins");
        new PinPulser(0, s1);
        new PinPulser(1, s1);
        new PinPulser(2, s1);
        new PinPulser(3, s1);
        new PinPulser(4, s1);
    }
}
